package com.iot.iotplus.service;

import com.iot.iotplus.VO.DeviceVO;
import com.iot.iotplus.VO.ProductCountVO;
import com.iot.iotplus.base.CommonPage;
import com.iot.iotplus.base.Result;
import com.iot.iotplus.entity.Device;
import com.iot.iotplus.entity.DeviceType;

import java.util.List;

public interface DeviceService  {
    //列表
    public Result<CommonPage<Device>> listDevice(String tenantId,String productId, int pageNum, int pageSize);
    public Result<CommonPage<Device>> listDeviceByProduct(String tenantId, int pageNum, int pageSize);
    public Result<DeviceVO> selectOneDevice(String id);

    public Result<Integer> deleteById(String id);
    public Result<List<DeviceType>> listDes();
    public Result<Integer> addDevice(Device device);

    Result<?> getDeviceType(String typeId);

    Result<?> getUpLinkData(String product,String device,String tenant,Integer pageNum,Integer pageSize);

    //查询所有设备、激活设备、当前在线设备
    public Result<?> countDevice(String tenantId);

    //认证成功更改激活状态
    Result<Integer> deviceActivate(String deviceKey);
    //查询每个产品的总数
    public Result<List<ProductCountVO>> countProds(String tenantId);

}
